//
//  MyTableViewCell.m
//  17-UI-AddressBook
//
//  Created by Snow on 16/8/6.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "MyTableViewCell.h"

@implementation MyTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _imageview = [[UIImageView alloc] init];
        _labelOfName = [[UILabel alloc] init];
        _labelOfPhone = [[UILabel alloc] init];
        [self.contentView addSubview:_imageview];
        [self.contentView addSubview:_labelOfPhone];
        [self.contentView addSubview:_labelOfName];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _imageview.frame = CGRectMake(5, 5, self.contentView.frame.size.width / 4, self.contentView.frame.size.height - 10);
    _imageview.image = [UIImage imageNamed:@"u=1563663233,4023384541&fm=23&gp=0"];
    _labelOfName.frame = CGRectMake(10 + self.contentView.frame.size.width / 4, 5, self.contentView.frame.size.width * 3 / 4 - 15, self.frame.size.height / 2 - 5);
    _labelOfPhone.frame = CGRectMake(10 + self.contentView.frame.size.width / 4, self.frame.size.height / 2 + 10, self.contentView.frame.size.width * 3 / 4 - 15, self.frame.size.height / 2 - 15);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
